<?php
/**
 * Description of index
 * 
 * @author trangnguyen
 * @since Dec 3, 2013 - 2:57:41 PM
 */
/**
 * End of index
 */
?>
<!--Trang - Tin tức tổng hợp-->
<?php $this->pageTitle = Option::getItem('news') . ' - ' . Option::getItem('site_name'); ?>
<div id="wapper-news" class="fl">
    <!--Danh sách tin tức-->
    <?php
    if ($posts):
        $i = 0;
        foreach ($posts as $value):
            $i++;
            ?>
            <div class="news-list <?php echo $i == 1 ? 'border-none' : ''; ?>">
                <div class="news-img fl">
                    <a href="<?php echo $value->publicUrl; ?>">
                        <img src="<?php echo $value->publicImg; ?>">
                    </a>
                </div>
                <div class="news-desc fl">
                    <a href="<?php echo $value->publicUrl; ?>">
                        <?php echo $value->title; ?>
                    </a>
                    <div class="time-up">
                        Đăng lúc: <?php echo date('H:i d/m/Y', $value->created_at); ?>
                    </div>
                    <div class="desc-more">
                        <?php echo $value->description; ?>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
        <?php endforeach; ?>
    <?php endif; ?>
</div>
<div id="wapper-other" class="fl">
    <div class="name-title" style="margin-top: 0px!important">
        Tin tức xem nhiều
    </div>
    <ul>
        <?php
        if ($count_view):
            $j = 0;
            foreach ($count_view as $post):
                ?>
                <li class="news-list <?php echo $j == 0 ? 'border-none' : ''; ?>">
                    <div class="other-thumb fl">
                        <a href="<?php echo $post->publicUrl ?>" title="<?php echo $post->title ?>">
                            <img src="<?php echo $post->publicImg ?>" alt="<?php echo $post->title ?>">
                        </a>
                    </div>
                    <div class="other-desc fl">
                        <a title="<?php echo $post->title ?>" href="<?php echo $post->publicUrl ?>">
                            <?php echo $post->title ?>
                        </a>
                    </div>
                    <div class="clear"></div>
                </li>
            <?php endforeach; ?>
        <?php endif; ?>
    </ul>
</div>
<div class="clear"></div>